#ifndef _MY_STACK_TEMPLATE_

template <typename kind>
class stack {
 private:
  int count;
  kind *data; // pointer to data
  int stackSize;
 public:
  stack(const int size); // explicit constructor
  ~stack(); // explicit destructor
  void push(const kind item);
  kind pop();
};

template <typename kind>
stack<kind>::stack(const int size)
{
  count = 0;
  data = new kind[size];
  stackSize = size;
}

template <typename kind>
void stack<kind>::push(kind item)
{
  data[count] = item;
  count++;
}

template <typename kind>
kind stack<kind>::pop()
{
  count--;   return data[count];
}

template <typename kind>
stack<kind>::~stack()
{
  delete[] data;
}

#define _MY_STACK_TEMPLATE_
#endif
